﻿<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>图片编辑</title>
<script src="kindeditor.js"></script>
<script src="lang/zh_CN.js"></script>
<script type="text/javascript">
var editor;
KindEditor.ready(function(K){
	editor=K.editor({
		allowFileManager : true
	});
	K("#upload").click(function(){
 		editor.loadPlugin('image', function() {
 			editor.plugin.imageDialog({
 				imageUrl : K('#url').val(), //如果图片路径框内有内容直接赋值于弹出框的图片地址文本框
 				//点击弹窗内”确定“按钮所执行的逻辑
 				clickFn : function(url, title, width, height, border, align) {
 				K('#url').val(url);//获取图片地址
 				editor.hideDialog(); //隐藏弹窗
 				}
 			});
		});	
	});
});
</script>
</head>
<body>
<button id="upload">开始上传</button>
</body>
</html>